<%--
  Created by IntelliJ IDEA.
  User: Kirito
  Date: 2022/3/8
  Time: 13:38
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<html>
<head>
    <title>班级类</title>
    <link href="/css/bootstrap.css" rel="stylesheet" type="text/css">
    <script src="/js/jquery.min.js" type="text/javascript"></script>
    <script src="/js/bootstrap.min.js" type="text/javascript"></script>
</head>
<body>
<h1 class="text-center">班级列表</h1>
<div>
    <table class="table table-striped table-hover table-bordered">
        <thead>
        <tr>
            <th>序号</th>
            <th>学院</th>
            <th>班级名称</th>
            <th>讲师姓名</th>
            <th>班级人数</th>
            <th>已点名次数</th>
            <th>累计缺勤人数</th>
            <th>缺勤率</th>
        </tr>
        </thead>
        <tbody></tbody>

    </table>

<script type="text/javascript">
    $(function () {
        $.get(
        "/rcclass/list",
            function (data) {
                for (var  i in data){
                    var tr=$("<tr></tr>");
                    tr.append("<td>"+data[i].id+"</td>");
                    tr.append("<td>"+data[i].college+"</td>");
                    tr.append("<td>"+data[i].className+"</td>");
                    tr.append("<td>"+data[i].teacherName+"</td>");
                    tr.append("<td>"+data[i].checkNum+"</td>");
                    tr.append("<td>"+data[i].absencePersonNum+"</td>");
                    tr.append("<td>"+data[i].absenceRate+"</td>");
                    tr.append("<td>"+data[i].studentNum+"</td>");
                     $("tbody").append(tr);
                }
            }
        )
    })


</script>

</div>
</body>
</html>
